version: '3.7'
services:
   db:
    image: postgres:13.3
    environment:
      - POSTGRES_DB=cok
      - POSTGRES_USER=cok_admin
      - POSTGRES_PASSWORD=cok123321cok
    volumes:
      - ./postgres-data:/var/lib/postgresql/data
    networks:
      - cok-frontend-backend

  pgadmin:
    image: dpage/pgadmin4:8.4
    environment:
      PGADMIN_DEFAULT_EMAIL: admin@pgadmin.ru
      PGADMIN_DEFAULT_PASSWORD: SzwN90
    ports:
      - 5051:80
    depends_on:
      - db
    networks:
      - cok-frontend-backend

networks:
  cok-frontend-backend:
